package com.spring.demo1.test;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.spring.demo1.App1Conf;
import com.spring.demo1.service.TestService;

public class MainCase01 {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext();
		ac.register(App1Conf.class);
		ac.refresh();
		// 能成功从容器中获取orderService,并成功调用orderService.query();方法
		TestService testService = ac.getBean(TestService.class);
		System.out.println(testService.get());
		ac.close();
	}
}
